/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.struts;

import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.Preparable;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.ServletResponseAware;

/**
 *
 * @author bicho
 */
public class ActionBase extends ActionSupport implements ServletRequestAware, ServletResponseAware, Preparable {

    HttpServletRequest request;
    HttpServletResponse response;

    public HttpServletRequest getRequest() {
        return request;
    }

    @Override
    public void setServletRequest(HttpServletRequest httpServletRequest) {
        System.out.println("-- setServletRequest --");
        this.request = httpServletRequest;
    }

    @Override
    public void setServletResponse(HttpServletResponse response){
        this.response = response;
    }

    @Override
    public void prepare() throws Exception {
        System.out.println("-- prepare --");
    }
}
